<?php


/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\Models\User::class, function (Faker\Generator $faker) {
    static $password;
    return [
        'name' => $faker->name,
        'email' => $faker->unique()->safeEmail,
        'password' => $password ?: $password = bcrypt('secret'),
        'remember_token' => str_random(10),
    ];
});

$factory->define(App\Models\Category::class, function (Faker\Generator $faker) {
  return [
    'name' => $faker->name,
    'alias' => $faker->text(20),
    'template_name' => $faker->text(20),

  ];
});

$factory->define(App\Models\Attachment::class, function (Faker\Generator $faker) {
  return [
    'filename' => $faker->name,
    'url'=> $faker->url,
    'md5'=>$faker->md5,
    'size'=>$faker->numberBetween(0,500000),
    'ext_name'=>'jpg',
    'mime_type'=>$faker->mimeType
  ];
});
